<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateIllegalsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('illegals', function (Blueprint $table) {
            $table->id();
            $table->integer('manager_id')->default(0)->comment('店长id');
            $table->string('manager_name')->default('')->comment('登记人');
            $table->string('car_id')->default('')->comment('违章id');
            $table->string('car_category')->default(0)->comment('车系类型');
            $table->string('car_name')->default(0)->comment('车名称');
            $table->string('order_sn')->default('')->comment('订单号');
            $table->string('plate_number')->default('')->comment('车牌号码');
            $table->string('username')->default('')->comment('违章人');
            $table->string('changer')->default('')->comment('违章修改人');
            $table->timestamp('date')->nullable()->comment('违章时间');
            $table->integer('scores')->default(0)->comment('扣分');
            $table->decimal('amount')->default(0.00)->comment('罚款金额');
            $table->tinyInteger('status')->default(0)->comment('0未收1已收');
            $table->string('contents')->default('')->comment('违章描述');
            $table->integer('car_series_id')->default(0)->comment('车系Id');
            $table->integer('gear_car_id')->default(0)->comment('车辆id');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('illegals');
    }
}
